chore: migrate CI from Hatch to uv native (uv sync / uv run)#11176
Draft
julian-risch wants to merge 2 commits intomainfrom
Draft
chore: migrate CI from Hatch to uv native (uv sync / uv run)#11176julian-risch wants to merge 2 commits intomainfrom
julian-risch wants to merge 2 commits intomainfrom
Conversation
…uardrails Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add [dependency-groups] to pyproject.toml mirroring the existing Hatch envs (dev, test, e2e), replace pip install hatch + hatch run in all workflows with astral-sh/setup-uv + uv sync + uv run, and add required-version = ">=0.9.17" to [tool.uv] so relative duration strings in exclude-newer are always enforced. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Collaborator
Coverage Report for CI Build 24821394718Warning No base build found for commit Coverage: 92.857%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsRequires a base build to compare against. How to fix this → Coverage Stats
💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates all CI workflows from Hatch to uv's native project interface, so that the
exclude-newersupply chain guardrail (introduced in the base PR) is actually enforced during dependency installation.Depends on: #11170
Background
Hatch uses
uv pip installunder the hood wheninstaller = "uv"is set, but theuv pipinterface does not read[tool.uv]project-level settings — includingexclude-newer. This means the 24-hour age guardrail added in the base PR had no effect on what Hatch actually installed in CI. Switching touv sync+uv runfixes this: uv's project interface reads[tool.uv]on every resolve.See uv dependency cooldowns docs.
Changes
pyproject.toml[dependency-groups]withdev,test, ande2egroups, mirroring the existing[tool.hatch.envs.*]dependency listsrequired-version = ">=0.9.17"to[tool.uv]— relative duration strings inexclude-newerrequire at least this version (released 2025-12-09)All 8 Hatch-based workflows — replace
actions/setup-python+pip install hatchwithastral-sh/setup-uv@v8.1.0, and translate everyhatch runcommand:hatch run fmt-checkuv sync --group dev+uv run ruff check && uv run ruff format --checkhatch run test:unituv sync --group test+uv run pytest -m "not integration" testhatch run test:integration-only-fastuv sync --group test+uv run pytest -m "integration and not slow" testhatch run test:integration-only-slowuv sync --group test+uv run pytest -m "integration and slow" testhatch run test:typesuv sync --group test+uv run mypy ...hatch run e2e:testuv sync --group e2e+uv run pytest e2ehatch run docsuv sync --group dev+uv run haystack-pydoc pydoc tmp_api_referencehatch builduv buildAGENTS.md— updated to documentuv sync+uv runas the primary workflowNotes
[tool.hatch.envs.*]sections are kept inpyproject.tomlfor local development compatibilityuv.lockis gitignored (this is a library, not an application), so CI resolves fresh each run — theexclude-newerconstraint is enforced on everyuv sync🤖 Generated with Claude Code